<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="NodosobjCreateDlg" widgetVar="NodosobjCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="Nodos Mapa Estrategico">
             <h:form id="NodosobjCreateForm">
                <h:panelGroup id="display">
                    <p:outputLabel value="Seleccione los objetivos estrategicos que se relacionan" for="obj" />
                    <p:panelGrid columns="2" rendered="#{nodosobjController.selected != null}" id="obj">
                        
                        
                        <p:outputLabel value="#{objOrigen}" for="objOrigen" />
                        <p:selectOneMenu id="objOrigen"
                                         value="#{nodosobjController.selected.objOrigen}" >
                            <f:selectItems value="#{objetivoestrategicoController.itemsAvailableSelectOne}"
                                           var="objEstrategicoItem"
                                           itemValue="#{objEstrategicoItem.idObjetivoEstrategico}"
                                           itemLabel="#{objEstrategicoItem.nombre}"
                                           itemDescription="#{objEstrategicoItem.idEstrategiaGlobal.estrategia}"/>
                        </p:selectOneMenu>
                        
                          <p:outputLabel value="#{objDestino}" for="objDestino" />
                        <p:selectOneMenu id="objDestino"
                                         value="#{nodosobjController.selected.objDestino}" >
                            <f:selectItems value="#{objetivoestrategicoController.itemsAvailableSelectOne}"
                                           var="objEstrategicoItem"
                                           itemValue="#{objEstrategicoItem.idObjetivoEstrategico}"
                                           itemLabel="#{objEstrategicoItem.nombre}"
                                           itemDescription="#{objEstrategicoItem.idEstrategiaGlobal.estrategia}"/>
                        </p:selectOneMenu>
                        
                    </p:panelGrid>
                    <p:commandButton actionListener="#{nodosobjController.create}" value="#{bundle.Save}" update="display,:NodosobjListForm:datalist,:growl" oncomplete="handleSubmit(args,'NodosobjCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="NodosobjCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
